package com.jl.jlapp.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jl.jlapp.R;
import com.jl.jlapp.eneity.UserCouponInfosModel;

import java.text.SimpleDateFormat;
import java.util.List;

public class UserUnUsableCouponAdapter
  extends BaseQuickAdapter<UserCouponInfosModel.ResultDataBean.DisabledCouponBean, BaseViewHolder>
{
  public UserUnUsableCouponAdapter(@LayoutRes int paramInt, @Nullable List<UserCouponInfosModel.ResultDataBean.DisabledCouponBean> paramList)
  {
    super(paramInt, paramList);
  }
  
  protected void convert(BaseViewHolder paramBaseViewHolder, UserCouponInfosModel.ResultDataBean.DisabledCouponBean paramDisabledCouponBean)
  {
    SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
    TextView localTextView1 = (TextView)paramBaseViewHolder.getView(R.id.tv_discount_explain);
    TextView localTextView2 = (TextView)paramBaseViewHolder.getView(R.id.tv_discount_time_start);
    TextView localTextView3 = (TextView)paramBaseViewHolder.getView(R.id.tv_discount_time_strip);
    TextView localTextView4 = (TextView)paramBaseViewHolder.getView(R.id.tv_discount_time_end);
    TextView localTextView5 = (TextView)paramBaseViewHolder.getView(R.id.tv_discount_money);
    TextView localTextView6 = (TextView)paramBaseViewHolder.getView(R.id.tv_discount_money_unit);
    TextView localTextView7 = (TextView)paramBaseViewHolder.getView(R.id.tv_discount_condition);
    TextView localTextView8 = (TextView)paramBaseViewHolder.getView(R.id.tv_get_coupon);
    RelativeLayout localRelativeLayout = (RelativeLayout)paramBaseViewHolder.getView(R.id.coupon_background);
    paramBaseViewHolder.setText(R.id.tv_discount_explain, paramDisabledCouponBean.getCouponInformation().getName());
    paramBaseViewHolder.setText(R.id.tv_discount_money, paramDisabledCouponBean.getCouponInformation().getPrice() + "");
    paramBaseViewHolder.setText(R.id.tv_discount_condition, "满¥" + paramDisabledCouponBean.getCouponInformation().getUseLimit() + "可用");
    paramBaseViewHolder.setText(R.id.tv_discount_time_start, localSimpleDateFormat.format(Long.valueOf(paramDisabledCouponBean.getCouponInformation().getBeginValidityTime())));
    paramBaseViewHolder.setText(R.id.tv_discount_time_end, localSimpleDateFormat.format(Long.valueOf(paramDisabledCouponBean.getCouponInformation().getEndValidityTime())));
    paramBaseViewHolder.setText(R.id.tv_get_coupon, paramDisabledCouponBean.getStateMsg());
    localTextView8.setTextColor(paramBaseViewHolder.itemView.getResources().getColor(R.color.white));
    localTextView8.setBackgroundResource(R.drawable.bg_coupon_white_border);
    localTextView5.setTextColor(paramBaseViewHolder.itemView.getResources().getColor(R.color.white));
    localTextView6.setTextColor(paramBaseViewHolder.itemView.getResources().getColor(R.color.white));
    localTextView7.setTextColor(paramBaseViewHolder.itemView.getResources().getColor(R.color.white));
    localTextView1.setTextColor(paramBaseViewHolder.itemView.getResources().getColor(R.color.coupon_explanation));
    localTextView2.setTextColor(paramBaseViewHolder.itemView.getResources().getColor(R.color.light_gray));
    localTextView3.setTextColor(paramBaseViewHolder.itemView.getResources().getColor(R.color.light_gray));
    localTextView4.setTextColor(paramBaseViewHolder.itemView.getResources().getColor(R.color.light_gray));
    localRelativeLayout.setBackgroundResource(R.drawable.coupe_bg_disable);
  }
}


/* Location:              /Users/davidzhang/Documents/decompileApk/jlfood-dex2jar.jar!/com/jl/jlapp/adapter/UserUnUsableCouponAdapter.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */